package com.bawei.module_my.myorder;

import com.bawei.library_base.room.paygood.PayGood;
import com.bawei.library_base.utils.GlideUtil;
import com.bawei.module_my.R;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * @author : zhiyu
 * @date : 2021/12/23
 * @content :
 */
public class MyOrderAdapter extends BaseQuickAdapter<PayGood, BaseViewHolder> {
    public MyOrderAdapter(@Nullable List<PayGood> data) {
        super(R.layout.layout_order_item, data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, PayGood payGood) {
        GlideUtil.getInstance().LoadImage(getContext(),payGood.getPimgUrl(),baseViewHolder.getView(R.id.mGoodsIconIv));
        baseViewHolder.setText(R.id.mGoodsDescTv,payGood.getPname());
        baseViewHolder.setText(R.id.mGoodsPriceTv,payGood.getPprice());
//        baseViewHolder.setText(R.id.mGoodsCountTv,payGood.getPcount());

    }
}
